import Vue from 'vue'
import VueRouter from 'vue-router'
//导入Layout界面，运行的时候就加载
import Layout from '@/Layout'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    component:Layout
  },
  {
    path:'/login',
    component:()=>import('@/views/Login')
  },
  {
    path:'/404',
    component:()=>import('@/views/404')
  },
  {
    path:'/',
    rediret:'/404'
  },
]

const router = new VueRouter({
  routes
})

export default router
